/*
 * File Name:               UIDragMover.cs
 * 
 * Description:             普通类
 * Author:                  lisiyu <576603306@qq.com>

 * Create Date:             2017/08/31
 */

namespace UnityEngine.UI
{
    using UnityEngine;
    using EventSystems;

    [DisallowMultipleComponent]
    [RequireComponent(typeof(Image))]
    public class UIDragMover : MonoBehaviour, IDragHandler
    {
        public void OnDrag(PointerEventData eventData)
        {
            transform.position = UIManager.Singleton.ScreenToWorldPoint(eventData.position, transform.position.z);
        }
    }
}